<?php
require_once '../Model/Player/OPRebelsFaction.php';

class RebelsFactionWith2RebelsTest extends PHPUnit_Framework_TestCase {
	
	public function setUp() {
		$this->powerBar = OPPowerBar::newWithGoalAndNumberOfLevels(100, 5);
		$this->rebelsFaction = OPRebelsFaction::newWithPowerBar($this->powerBar);
		
		$this->aRebel = OPRebel::newWithEmei('1234');
		$anotherRebel = OPRebel::newWithEmei('4567');
		
		$this->rebelsFaction->addMember($this->aRebel)
							->addMember($anotherRebel);
		
	}
	
	/**
	 * @test
	 */
	public function factionMembersShouldBe2() {
		$this->assertEquals(2, sizeof($this->rebelsFaction->factionMembers()));
		
	}
	
	/**
	 * @test
	 */
	public function factionMembersShouyldBe1AfterRemovingAPlayer() {
		$this->rebelsFaction->removeMember($this->aRebel);
		
		$this->assertEquals(1, sizeof($this->rebelsFaction->factionMembers()));
		
	}

	
}